<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>临控人员列表</title>
    <#include "/common/resource.ftl">
    <script type="text/javascript" src="${params.contextPath}/common/My97DatePicker/WdatePicker.js"></script>
    <script type="text/javascript" src="${params.contextPath}/js/moment.min.js"></script>
    <script type="text/javascript">
        var getSearchParams = function(){
            return {
                beginTime:$("input[name='beginTime']").val() || "",
                endTime:$("input[name='endTime']").val() || "",
                sqdw:$("input[name='sqdw']").val() || "",
                sfzh:$("input[name='sfzh']").val() || "",
            };
        }
    </script>
</head>
<body class="bg-gray">

   <div class="ui-operation">
       <div class="ui-buttons">
   		 <div class="layui-btn-group tools">
            <button class="layui-btn layui-btn-normal open-dialog" p="url:'${params.contextPath}/view/icip/linkongrenyuan/linkongrenyuan_edit.htm',title:'导入人员',width:'800px',height:'90%'"><i class="fa fa-plus"></i>导入人员</button>
            <button class="layui-btn layui-btn-normal exportButton"><i class="fa fa-download"></i>导出</button>
         </div>   
         <div class="ui-searchs">
             <div class="value" style="">
             <input type="text" id="beginTime" name="beginTime" placeholder="导入起始时间" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss', maxDate:'#F{$dp.$D(\'endTime\')}'})">
             -
             <input type="text" id="endTime" name="endTime" placeholder="导入终止时间" onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss', minDate:'#F{$dp.$D(\'beginTime\')}'})">
             <input type="text" name="sqdw" placeholder="申请单位">
                 <input type="text" name="sfzh" placeholder="身份证号">
             </div>
             <input type="button" value="搜索" class="layui-btn layui-btn-danger search-button"/>
         </div>
       </div>
   </div>
   <div class="ui-content" style="padding-left: 10px;padding-right:10px;">
       <table id="datagrid" options="url:'${params.contextPath}/web/bjlkryxx/list.json',params:'getSearchParams'">
			<thead>
               	<tr>
                   <th data-options="field:'id',checkbox:true"></th>
                   <th data-options="field:'sfzh',width:80">身份证号</th>
                   <th data-options="field:'xm',width:40">姓名</th>
                   <th data-options="field:'rylb',width:80">人员类别</th>
                   <th data-options="field:'jyaq',width:80">简要案情</th>
                   <th data-options="field:'sqrmc',width:40">申请人</th>
                   <th data-options="field:'sqrdh',width:60">申请人电话</th>
                   <th data-options="field:'bbkrhjdxz',width:80">被布控人户籍地详址</th>
                   <th data-options="field:'xzz',width:80">现住址</th>
                   <th data-options="field:'cjsj',width:80,formatter:formatCjsj">导入时间</th>
                   <th data-options="field:'cjdwmc',width:60">申请单位</th>
				</tr>
			</thead>
       </table>
   </div>
   
</body>
<script type="text/javascript">
function formatCjsj(val, row){
	if(val){
		var d = new Date(val);
		return moment(d).format("YYYY-MM-DD HH:mm:ss");
	}
}
$(function(){
	$(".exportButton").click(function(){
		var beginTime = $("input[name='beginTime']").val() || "";
		var endTime = $("input[name='endTime']").val() || "";
		var sqdw = $("input[name='sqdw']").val() || "";
		var sfzh = $("input[name='sfzh']").val() || "";
		var url = "${rc.contextPath}/web/bjlkryxx/export.json?beginTime="+beginTime
				+"&endTime="+endTime
				+"&sqdw="+sqdw
				+"&sfzh="+sfzh;
		window.location.href = url;
	});
	 
    
});
</script>
</html>
